<head>
    <meta charset="UTF-8">
<title>算法训练 旅行家的预算</title>
<link rel="stylesheet" href="../css/main.css">
</head>
 <p><style type="text/css">
	<!--
		@page { margin: 0.79in }
		P { margin-bottom: 0.08in }
	-->
	</style></p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">问题描述</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">一个旅行家想驾驶汽车以最少的费用从一个城市到另一个城市（假设出发时油箱是空的）。给定两个城市之间的距离<font face="DejaVu Serif, serif"><font face="宋体, SimSun">D1</font></font>、汽车油箱的容量<font face="DejaVu Serif, serif"><font face="宋体, SimSun">C</font></font>（以升为单位）、每升汽油能行驶的距离<font face="DejaVu Serif, serif"><font face="宋体, SimSun">D2</font></font>、出发点每升汽油价格<font face="DejaVu Serif, serif"><font face="宋体, SimSun">P</font></font>和沿途油站数<font face="DejaVu Serif, serif"><font face="宋体, SimSun">N</font></font>（<font face="DejaVu Serif, serif"><font face="宋体, SimSun">N</font></font>可以为零），油站<font face="DejaVu Serif, serif"><font face="宋体, SimSun">i</font></font>离出发点的距离<font face="DejaVu Serif, serif"><font face="宋体, SimSun">Di</font></font>、每升汽油价格<font face="DejaVu Serif, serif"><font face="宋体, SimSun">Pi</font></font>（<font face="DejaVu Serif, serif"><font face="宋体, SimSun">i=1</font></font>，<font face="DejaVu Serif, serif"><font face="宋体, SimSun">2</font></font>，&hellip;&hellip;<font face="DejaVu Serif, serif"><font face="宋体, SimSun">N</font></font>）。计算结果四舍五入至小数点后两位。如果无法到达目的地，则输出&ldquo;<font face="DejaVu Serif, serif"><font face="宋体, SimSun">No</font><font face="宋体, SimSun"> </font><font face="宋体, SimSun">Solution</font><font face="宋体, SimSun">&rdquo;</font></font>。</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">输入格式</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">第一行为4个实数D1、C、D2、P与一个非负整数N；</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">接下来N行，每行两个实数Di、Pi。</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">输出格式</p>
<p style="text-indent: 0.29in; margin-bottom: 0in;">如果可以到达目的地，输出一个实数（四舍五入至小数点后两位），表示最小费用；否则输出&ldquo;No Solution&rdquo;（不含引号）。</p>
<p style="margin-bottom: 0in">样例输入</p>
<p style="margin-bottom: 0in;"><font face="DejaVu Serif, serif"><font face="宋体, SimSun">275.6</font><font face="宋体, SimSun"> </font><font face="宋体, SimSun">11.9</font><font face="宋体, SimSun"> </font><font face="宋体, SimSun">27.4</font><font face="宋体, SimSun"> </font><font face="宋体, SimSun">2.8</font><font face="宋体, SimSun"> </font><font face="宋体, SimSun">2</font></font></p>
<p style="margin-bottom: 0in;"><font face="DejaVu Serif, serif"><font face="宋体, SimSun">102.0 2.9</font></font></p>
<p style="margin-bottom: 0in"><font face="DejaVu Serif, serif"><font face="宋体, SimSun">220.0 2.2<br />
</font></font></p>
<p style="margin-bottom: 0in">样例输出</p>
<p style="text-indent: 0.29in; margin-bottom: 0in"><font face="DejaVu Serif, serif">26.95</font></p>